package com.azunitech.jms.repos;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name="Location")
public class Location {
	@Id 
	private String id;
	
	private long quantity;
	    
	@ManyToOne
	private Parts parts;

    public String getId() {
        return id;
    }
	    
    public void setId(String id) {
        this.id = id;
    }

	public Parts getParts() {
		return parts;
	}
	
	public void setQuantity( long quantity){
		this.quantity = quantity;
	}
	
	public String toString(){
		StringBuffer buffer = new StringBuffer();
		buffer.append("id= ").append(this.getId());
		buffer.append(" ");
		buffer.append("Quantity= ").append(this.getQuantity());
		return buffer.toString();
	}
	
	public long getQuantity(){
		return this.quantity;
	}

	public void setParts(Parts parts) {
		this.parts = parts;
	}
}
